package com.hh.vietnameseproject.ui.login

import android.content.Context
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

class LoginAdapter(val fm:FragmentManager,val context: Context,val totalTabs:Int,var s:Array<String>): FragmentPagerAdapter(fm) {


    override fun getItem(position: Int): Fragment {
        return when (position) {
            0 ->LoginPasswordTabFragment()
            1 ->LoginCodeTabFragment()
            else -> Fragment()
        }
    }
    override fun getPageTitle(position: Int): CharSequence? {
        return s[position]
    }
    override fun getCount() = totalTabs
}